@forelse($threads as $thread)
    <div class="card mb-3">
        <div class="card-body">
            <div class="card-title">
                <div class="level">
                    <div class="flex">
                        <h4>
                            <a href="{{$thread->path()}}">
                                @if(auth()->user() && $thread->hasUpdatedFor(auth()->user()))
                                    <strong>{{$thread->title}}</strong>
                                @else
                                    {{$thread->title}}
                                @endif
                            </a>
                        </h4>
                        <h5>
                            Posted By:<a href="{{ route('profile',$thread->creator) }}">{{ $thread->creator->name }}</a>
                        </h5>
                    </div>
                    <a href="{{$thread->path()}}">
                        {{$thread->replies_count}} {{str_plural('reply',$thread->replies_count)}}
                    </a>

                </div>
            </div>
            <hr>
            <div class="card-text">
                <div class="body">
                    {{$thread->body}}
                </div>
            </div>
        </div>
        <div class="card-footer">
            {{ $thread->visits }} Visits
        </div>
    </div>
@empty
    <p>There are no relevant results at this time.</p>
@endforelse
